#define _CRT_SECURE_NO_WARNINGS 1
int removeElement(int* nums, int numsSize, int val) {
    int n;
    int length;
    int m = 0;
    int num2[numsSize] = { 0 };
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == val)
        {
            n++;
            length = numsSize - 1;
        }
    }
    for (int i = 0; i < numsSize; i++)
    {
        if (val == nums[i])
        {
            m++;
            for (int j = i; j < numsSize - m; j++)
            {
                nums[j] = nums[j + 1];
            }
        }
        if (val == nums[numsSize - 1 - m])
        {
            for (int j = 0; j < numsSize - 2 - m; j++)
            {
                num2[i] = num1[i];
            }
        }
    }
    return length;
    return nums;
}